package com.sky.demo.json;

import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSONObject;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.io.Serializable;

@Data
@ToString
public class IssueRedeemResponse  implements Serializable {

	private Data obj;

	@lombok.Data
	@ToString
	public static class Data implements Serializable{
		private String redeemcode;
		private String beginTime;
		private String endTime;
		private String exchangeStatus = "UNEXCHANGE";
	}

	public static void main(String[] args) throws Exception {
		Data data = new Data();
		data.setBeginTime("2022-11-08");
		data.setEndTime("2022-11-15");
		data.setRedeemcode("B3097F03LNIN8B45");
		data.setExchangeStatus("UNEXCHANGE");
		JSONObject jsonObject = JSONObject.parseObject(JSONUtil.toJsonStr(data));
		System.out.println(jsonObject);
	}
}
